function flip_dialog(message, html) {

  // fix backstyle
	$(&#39;.flip-container .back&#39;).height($(&#39;.flip-container .front&#39;).height());

	// scroll to top
	$(window).scrollTop(0)

	if(html)
		$(&#39;.flip-container .back p&#39;).html(message);
	else
		$(&#39;.flip-container .back p&#39;).text(message);
	
	
	// then flip that side
	$(&#39;.flip-container&#39;).addClass(&#39;hover&#39;);
	$(&#39;.flip-container .back button&#39;).click(function(){
		$(&#39;.flip-container&#39;).removeClass(&#39;hover&#39;);
	});
	
}

$(function() {
	$(&#39;#menu li&#39;).click(function() {
		flip_dialog(&quot;this is Spartaaaaaaaaaaaaaa !!!!! &quot;);
	});
	
	$(&#39;.large-buttons&#39;).click(function() {
		flip_dialog(&quot;Another Message for the greate spartians !!!!! &quot;);
	});

});
